<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:mc="http://java.sun.com/jsf/composite/components"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j">
<h:body>
	<ui:composition template="/templates/common.xhtml">
		<ui:define name="header.yeni.anket">
			<li><h:link outcome="newPoll.xhtml" class="but4_active" value="Yeni Anket"/>
			</li>
		</ui:define>
		<ui:define name="pageTitle">Yeni Anket</ui:define>


		<ui:define name="sidebar">
			<div id="sidebar">
				<h:graphicImage library="images" name="title1.gif" width="174"
					height="30" />
				<br />
				<div class="inner_copy">
					<a href="http://www.bestfreetemplates.org/">free templates</a><a
						href="http://www.bannermoz.com/">banner templates</a>
				</div>
				<ul id="list">
					<li class="color"><a href="#">mustafa</a>
					</li>
					<li><a href="#">muahmemt</a>
					</li>
				</ul>
			</div>
		</ui:define>



		<ui:define name="main">
			<div id="main_block">
			
			
			<h:form prependId="false">  
  
    <p:panel id="panel" header="New Person" style="margin-bottom:10px;">  
        <p:messages />  
        <h:panelGrid columns="3">  
           <h:outputLabel for="size" value="Size:" />  
           <h:selectOneMenu id="size" value="#{personBean.sizeOfOption}">
								<f:selectItem itemValue="0" itemLabel="select number" />
								<f:selectItem itemValue="1" itemLabel="1" />
								<f:selectItem itemValue="2" itemLabel="2" />
								<f:selectItem itemValue="3" itemLabel="3" />
								<f:selectItem itemValue="4" itemLabel="4" />
								<f:selectItem itemValue="5" itemLabel="5" />
								<f:ajax render="myRepeat" event="valueChange"
									listener="#{personBean.handleOptionChange}"></f:ajax>
							</h:selectOneMenu>
            <p:message for="size" />  
              
            <h:outputLabel for="title" value="Title:" />  
            <h:inputText id="title" value="#{personBean.pollTitle}" required="true" label="Title" />
            <p:message for="title" />  
            
            <h:outputLabel for="myRepeat" value="Seçenekler:" />
            <h:outputLabel  value="" /> 
            <h:outputLabel  value="" /> 
            
              
              
              <h:outputLabel  value="" />
            <h:panelGrid id="myRepeat" columns="1" >
            
            <ui:repeat value="#{personBean.optionList}" var="option" itemType="square" varStatus="status">  
   <h:inputText value="#{option.content}"/> <h:outputLabel value="${status.index }"/><br />	 <br />
</ui:repeat>  					
			</h:panelGrid>
	
			
            <h:outputLabel  value="" /> 
            
            <h:outputLabel  value="" /> 
            <h:commandButton value="send" action="#{personBean.addPoll()}" />
            <h:outputLabel  value="" /> 
						
        </h:panelGrid>  
    </p:panel>  
  
<!--     <p:commandButton value="Ajax Submit" update="panel,display"  actionListener="#{pprBean.savePerson}" />  -->
             
             
             </h:form>
             
             
             
				



			</div>



		</ui:define>
	</ui:composition>




</h:body>

</html>